<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>毕业论文</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <style>
        .layui-form-label {
            width: 120px;
        }

        .layui-form-label2 {
            padding-top: 0px;
            padding-bottom: 0px;
        }

        .layui-input-block {
            margin-left: 150px;
        }
    </style>
</head>
<body>


<div class="layui-fluid">
    <div class="layui-row layui-col-space15">

        <div class="layui-col-md12">
            <div class="layui-card">

                <div class="layui-card-header">毕业论文</div>
                <div class="layui-card-body">

                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">论文类型</label>
                                <div class="layui-input-inline">
                                    <select name="quiz">
                                        <option value="">基础研究</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">论文选题来源</label>
                                <div class="layui-input-inline">
                                    <select name="quiz">
                                        <option value="">973，863课题</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label ">论文题目</label>
                            <div class="layui-input-block  ">
                                <input type="text" name="number" lay-verify="required|number"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">论文摘要</label>
                            <div class="layui-input-block">
                                <textarea placeholder="请输入内容" class="layui-textarea"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn" lay-submit="" id="upload"><i class="layui-icon"></i>上传论文</button>
                                <button class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
                                <button type="reset" class="layui-btn layui-btn-primary">查看论文</button>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>
<script src="../../../layuiadmin/layui/layui.js"></script>
</body>
<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'layer', 'table','upload'], function () { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
        var table = layui.table, upload = layui.upload;
        //拖拽上传
        upload.render({
            elem: '#upload'
            , url: '/upload/'
            , done: function (res) {
                console.log(res)
            }
        });

        function Paper() {
            this.init();
        }

        Paper.prototype = {
            //方法级渲染
            initTable: function () {
            },
            add: function () {
                var add_form = $('#add_form');
                layer.open({
                    type: 1
                    ,title:'添加'
                    , id: 'addDiv' //防止重复弹出
                    , content: add_form
                    , shade: 0.8
                    , area: ['800px', '600px']
                    , maxmin: true
                    , btn: ['保存', '返回']
                    , btnAlign: 'c' //按钮居中
                    , success: function (layero, index) {
                        add_form.removeClass('layui-hide');
                    }
                    , end: function (layero, index) {
                        add_form.addClass('layui-hide');
                    }
                    , yes: function () {
                        layer.closeAll();
                    }
                    , btn2: function (index, layero) {
                        layer.closeAll();
                    }
                });
            },
            init: function () {
                this.initTable();
            }
        }

        var paper = new Paper();


    });
</script>
</html>